package com.subang.function.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.subang.common.annotation.Excel;
import com.subang.common.core.domain.BaseEntity;

/**
 * PK答题房间信息对象 sb_pk_room
 * 
 * @author subei
 * @date 2025-09-14
 */
public class SbPkRoom extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 房间ID */
    private Long id;

    /** 房间编码（用于分享邀请） */
    @Excel(name = "房间编码", readConverterExp = "用=于分享邀请")
    private String roomCode;

    /** 创建者用户ID（房主） */
    @Excel(name = "创建者用户ID", readConverterExp = "房=主")
    private Long creatorId;

    /** 答题模式 */
    @Excel(name = "答题模式")
    private String modeType;

    /** 答题数量 */
    @Excel(name = "答题数量")
    private Long questionCount;

    /** 误差范围 */
    @Excel(name = "误差范围")
    private String errorRange;

    /** 房间状态（0-等待中 1-答题中 2-已结束 3-已解散） */
    @Excel(name = "房间状态", readConverterExp = "0=-等待中,1=-答题中,2=-已结束,3=-已解散")
    private Long status;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expireTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setRoomCode(String roomCode) 
    {
        this.roomCode = roomCode;
    }

    public String getRoomCode() 
    {
        return roomCode;
    }

    public void setCreatorId(Long creatorId) 
    {
        this.creatorId = creatorId;
    }

    public Long getCreatorId() 
    {
        return creatorId;
    }

    public void setModeType(String modeType) 
    {
        this.modeType = modeType;
    }

    public String getModeType() 
    {
        return modeType;
    }

    public void setQuestionCount(Long questionCount) 
    {
        this.questionCount = questionCount;
    }

    public Long getQuestionCount() 
    {
        return questionCount;
    }

    public void setErrorRange(String errorRange) 
    {
        this.errorRange = errorRange;
    }

    public String getErrorRange() 
    {
        return errorRange;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setExpireTime(Date expireTime) 
    {
        this.expireTime = expireTime;
    }

    public Date getExpireTime() 
    {
        return expireTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("roomCode", getRoomCode())
            .append("creatorId", getCreatorId())
            .append("modeType", getModeType())
            .append("questionCount", getQuestionCount())
            .append("errorRange", getErrorRange())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("expireTime", getExpireTime())
            .toString();
    }
}
